package vashion.azeroth.core.service;

import java.util.List;
import java.util.Map;

import vashion.azeroth.core.personal.pojo.PersonalMember;
import vashion.azeroth.core.result.ApiResult;

public interface PersonalMemberService<T> {

	ApiResult<T> login(PersonalMember member);
	
	ApiResult<T> register(PersonalMember member);

	ApiResult<PersonalMember> checkMember(PersonalMember member);

	int findCnt(PersonalMember member);
	
	ApiResult<Map<String, Object>> findInvitedMember(PersonalMember member);

	ApiResult<T> findPwd(String newPwd, String memberName);
	
	ApiResult<T> updatePwd(String oldPwd, String newPwd, Long memberId);
	
	PersonalMember getMemberByNick(String nickName);
	
	ApiResult<T> autoLogin(PersonalMember member);
	
	ApiResult<T> modifyMember(PersonalMember member);
	
	PersonalMember get(Long memberId);
	
	/**
	 * 设置或修改支付密码
	 * @param memberId
	 * @param type
	 * @param newPwd
	 * @param oldPwd
	 * @return
	 */
	ApiResult<T> handlePayPwd(Long memberId, String type, String newPwd);
	
	/**
	 * 验证支付密码接口
	 * @param memberId
	 * @param pwd
	 * @return
	 */
	ApiResult<String> checkPayPwd(Long memberId, String pwd);
	
	/**
	 * 后台用户登录
	 * @param backMember
	 * @return
	 */
	ApiResult<PersonalMember> backLogin(PersonalMember backMember);
	
	/**
	 * 后台用户注册
	 * @param member
	 * @return
	 */
	ApiResult<T> backRegister(PersonalMember member);

	/**
	 * 获取后台管理员列表
	 * @return
	 */
	ApiResult<List<PersonalMember>> getAdminList();
	
}
